<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>设置页</title>
    <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha512-SfTiTlX6kk+qitfevl/7LibUOeJWlt9rbyDn92a1DqWOw9vWG2MFoays0sgObmWazO5BQPiFucnnEAjpAB+/Sw==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <style>
        .setting-item {
            background-color: white;
            border-radius: 12px;
            padding: 16px;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
            margin-bottom: 16px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .toggle {
            position: relative;
            display: inline-block;
            width: 50px;
            height: 26px;
        }

        .toggle input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #ccc;
            -webkit-transition: .4s;
            transition: .4s;
            border-radius: 34px;
        }

        .slider:before {
            position: absolute;
            content: "";
            height: 20px;
            width: 20px;
            left: 3px;
            bottom: 3px;
            background-color: white;
            -webkit-transition: .4s;
            transition: .4s;
            border-radius: 50%;
        }

        input:checked + .slider {
            background-color: #FF6B6B;
        }

        input:focus + .slider {
            box-shadow: 0 0 1px #FF6B6B;
        }

        input:checked + .slider:before {
            -webkit-transform: translateX(24px);
            -ms-transform: translateX(24px);
            transform: translateX(24px);
        }
    </style>
</head>
<!-- https://unpkg.com/font-awesome@4.7.0/css/font-awesome.css -->
<body>
    <header class="bg-white p-4 shadow-md flex justify-between items-center">
        <div class="flex items-center space-x-4">
            <button onclick="javascript:changePage1(1)" class="p-2 rounded-full bg-gray-100 hover:bg-gray-200">
                <i class="fa fa-arrow-left"></i>
            </button>
            <h1 class="text-xl font-bold">设置</h1>
        </div>
    </header>

    <main class="p-4 space-y-6">
        <div class="setting-item">
            <div>
                <h3 class="text-lg font-bold">通知设置</h3>
                <p class="text-sm text-gray-600">开启或关闭各类通知</p>
            </div>
            <label class="toggle">
                <input type="checkbox" checked>
                <span class="slider"></span>
            </label>
        </div>

        <div class="setting-item">
            <div>
                <h3 class="text-lg font-bold">自动下载</h3>
                <p class="text-sm text-gray-600">在 Wi-Fi 环境下自动下载新播客</p>
            </div>
            <label class="toggle">
                <input type="checkbox">
                <span class="slider"></span>
            </label>
        </div>

        <div class="setting-item">
            <div>
                <h3 class="text-lg font-bold">播放模式</h3>
                <p class="text-sm text-gray-600">选择顺序播放、随机播放等模式</p>
            </div>
            <select class="border border-gray-300 rounded-md p-2">
                <option>顺序播放</option>
                <option>随机播放</option>
                <option>单曲循环</option>
            </select>
        </div>

        <div class="setting-item">
            <div>
                <h3 class="text-lg font-bold">语速调节</h3>
                <p class="text-sm text-gray-600">调整播客播放的语速</p>
            </div>
            <input type="range" class="w-32" min="0.5" max="2" step="0.1" value="1">
        </div>

        <div class="setting-item">
            <div>
                <h3 class="text-lg font-bold">清除缓存</h3>
                <p class="text-sm text-gray-600">清除本地缓存以释放空间</p>
            </div>
            <button class="px-4 py-2 bg-red-500 text-white rounded-md">清除</button>
        </div>

        <div class="setting-item">
            <div>
                <h3 class="text-lg font-bold">关于我们</h3>
                <p class="text-sm text-gray-600">了解应用的版本信息和开发团队</p>
            </div>
            <div>
                <p class="text-sm text-gray-600">版本：1.0.0</p>
            </div>
        </div>
    </main>

    <!-- <script src="https://kit.fontawesome.com/your-fontawesome-kit.js" crossorigin="anonymous"></script> -->
</body>
<script type="text/javascript">
    

    function changePage1(e){
        window.parent.postMessage('Hello from iframe','http://localhost:88/');
        window.parent.changePage(1)
    }
</script>
</html>
